package com.bl.student.dao;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * Created by yujingyi on 2017/12/18.
 */
@Configuration
@Import(DataSourceConfig.class)
@ComponentScan(basePackages = {"com.bl.student.dao"})
public class DaoConfig {
//    @Bean
//    @Primary
//    @ConfigurationProperties("app.datasource.master")
//    public DataSourceProperties masterDataSourceProperties() {
//        return new DataSourceProperties();
//    }
//
//    @Bean
//    @Primary
//    @ConfigurationProperties("app.datasource.master")
//    public DataSource masterDataSource() {
//        return masterDataSourceProperties().initializeDataSourceBuilder().build();
//    }
//
//    @Bean
//    @ConfigurationProperties("app.datasource.slave")
//    public DataSourceProperties slaveDataSourceProperties() {
//        return new DataSourceProperties();
//    }
//
//    @Bean
//    @ConfigurationProperties("app.datasource.slave")
//    public DataSource slaveDataSource() {
//        return slaveDataSourceProperties().initializeDataSourceBuilder().build();
//    }
}
